using System;
using System.Collections.Generic;
using System.Text;
using RideMe.Presentation.Properties;
using System.Windows.Forms;

namespace RideMe.Presentation
{
    public static class MessageService
    {
        /// <summary>
        /// Shows the error in a message box.
        /// </summary>
        /// <param name="message">The message.</param>
        public static void ShowError(Control owner, string message)
        {
            MessageBox.Show(owner, message, Resources.ErrorCaption, MessageBoxButtons.OK, MessageBoxIcon.Error);   
        }


        /// <summary>
        /// Shows the message in an informational message box.
        /// </summary>
        /// <param name="message"></param>
        public static void ShowInformationalMessage(Control owner, string message)
        {
            MessageBox.Show(owner, message, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information);   
        } 

        /// <summary>
        /// Shows the question in a Yes/No message box.
        /// </summary>
        /// <param name="message">The message.</param>
        /// <returns></returns>
        public static DialogResult ShowQuestion(Control owner, string message)
        {
            return MessageBox.Show(owner, message, Resources.DefaultMessageCaption, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
        }

        /// <summary>
        /// Shows the question in a Yes/No/Cancel message box.
        /// </summary>
        /// <param name="message">The message.</param>
        /// <returns></returns>
        public static DialogResult ShowQuestionWithCancel(Control owner, string message)
        {
            return MessageBox.Show(owner, message, Resources.DefaultMessageCaption, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
        }
    }
}
